#ifndef HSE_INDEX_BUILDER_H
#define HSE_INDEX_BUILDER_H
#include <vector>
#include <hash_map>
#include <map>
#include <stdio.h>
#include "hse_common.h"
#include "hse_types.h"
#include "document_reader.h"
#include "structured_index.h"

namespace hse {

using stdext::hash_map;
using std::vector;
using std::map;

class IndexBuilder {
public:
	explicit IndexBuilder(const char* index_dir);
	~IndexBuilder();
	void AddDocumentsInDir(const char *dir);
	void AddDocument(const char *doc_name);
	int Dump();
private:


	map<string, Posting*, StringLess> postings;
	string index_dir_;

	DISALLOW_COPY_AND_ASSIGN(IndexBuilder);
};

} //end of namespace

#endif